home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / files / morefiles / cheaders / morefiles.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  42.1 KB  |  1,242 lines

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    The long lost high-level and FSSpec File Manager functions.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support Emeritus
  7. **
  8. **    File:        MoreFiles.h
  9. **
  10. **    Copyright © 1992-1999 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILES__
  23. #define __MOREFILES__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. #include "Optimization.h"
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /*****************************************************************************/
  35.  
  36. pascal    OSErr    HGetVolParms(ConstStr255Param volName,
  37.                              short vRefNum,
  38.                              GetVolParmsInfoBuffer *volParmsInfo,
  39.                              long *infoSize);
  40. /*    ¶ Determine the characteristics of a volume.
  41.     The HGetVolParms function returns information about the characteristics
  42.     of a volume. A result of paramErr usually just means the volume doesn't
  43.     support PBHGetVolParms and the feature you were going to check
  44.     for isn't available.
  45.  
  46.     volName            input:    A pointer to the name of a mounted volume
  47.                             or nil.
  48.     vRefNum            input:    Volume specification.
  49.     volParmsInfo    input:    Pointer to GetVolParmsInfoBuffer where the
  50.                             volume attributes information is returned.
  51.                     output:    Atributes information.
  52.     infoSize        input:    Size of buffer pointed to by volParmsInfo.
  53.                     output: Size of data actually returned.
  54.     
  55.     Result Codes
  56.         noErr                0        No error
  57.         nsvErr                -35        Volume not found
  58.         paramErr            -50        Volume doesn't support this function
  59.     
  60.     __________
  61.     
  62.     Also see the macros for checking attribute bits in MoreFilesExtras.h
  63. */
  64.  
  65. /*****************************************************************************/
  66.  
  67. pascal    OSErr    HCreateMinimum(short vRefNum,
  68.                                long dirID,
  69.                                ConstStr255Param fileName);
  70. /*    ¶ Create a new file with no creator or file type.
  71.     The HCreateMinimum function creates a new file without attempting to set
  72.     the creator and file type of the new file.  This function is needed to
  73.     create a file in an AppleShare "drop box" where the user can make
  74.     changes, but cannot see folder or files.
  75.     
  76.     vRefNum        input:    Volume specification.
  77.     dirID        input:    Directory ID.
  78.     fileName    input:    The name of the new file.
  79.     
  80.     Result Codes
  81.         noErr                0        No error
  82.         dirFulErr            -33        File directory full
  83.         dskFulErr            -34        Disk is full
  84.         nsvErr                -35        No such volume
  85.         ioErr                -36        I/O error
  86.         bdNamErr            -37        Bad filename
  87.         fnfErr                -43        Directory not found or incomplete pathname
  88.         wPrErr                -44        Hardware volume lock
  89.         vLckdErr            -46        Software volume lock
  90.         dupFNErr            -48        Duplicate filename and version
  91.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  92.         afpAccessDenied        -5000    User does not have the correct access
  93.         afpObjectTypeErr    -5025    A directory exists with that name
  94.     
  95.     __________
  96.     
  97.     Also see:    FSpCreateMinimum
  98. */
  99.  
  100. /*****************************************************************************/
  101.  
  102. pascal    OSErr    FSpCreateMinimum(const FSSpec *spec);
  103. /*    ¶ Create a new file with no creator or file type.
  104.     The FSpCreateMinimum function creates a new file without attempting to set 
  105.     the the creator and file type of the new file.  This function is needed to
  106.     create a file in an AppleShare "dropbox" where the user can make
  107.     changes, but cannot see folder or files. 
  108.     
  109.     spec        input:    An FSSpec record specifying the file to create.
  110.     
  111.     Result Codes
  112.         noErr                0        No error
  113.         dirFulErr            -33        File directory full
  114.         dskFulErr            -34        Disk is full
  115.         nsvErr                -35        No such volume
  116.         ioErr                -36        I/O error
  117.         bdNamErr            -37        Bad filename
  118.         fnfErr                -43        Directory not found or incomplete pathname
  119.         wPrErr                -44        Hardware volume lock
  120.         vLckdErr            -46        Software volume lock
  121.         dupFNErr            -48        Duplicate filename and version
  122.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  123.         afpAccessDenied        -5000    User does not have the correct access
  124.         afpObjectTypeErr    -5025    A directory exists with that name
  125.     
  126.     __________
  127.     
  128.     Also see:    HCreateMinimum
  129. */
  130.  
  131. /*****************************************************************************/
  132.  
  133. pascal    OSErr    ExchangeFiles(short vRefNum,
  134.                               long srcDirID,
  135.                               ConstStr255Param srcName,
  136.                               long dstDirID,
  137.                               ConstStr255Param dstName);
  138. /*    ¶ Exchange the data stored in two files on the same volume.
  139.     The ExchangeFiles function swaps the data in two files on the same
  140.     volume by changing some of the information in the volume catalog and,
  141.     if the files are open, in the file control blocks.
  142.  
  143.     vRefNum        input:    Volume specification.
  144.     srcDirID    input:    Source directory ID.
  145.     srcName        input:    Source file name.
  146.     dstDirID    input:    Destination directory ID.
  147.     dstName        input:    Destination file name.
  148.     
  149.     Result Codes
  150.         noErr                0        No error
  151.         nsvErr                -35        Volume not found
  152.         ioErr                -36        I/O error
  153.         fnfErr                -43        File not found
  154.         fLckdErr            -45        File is locked
  155.         vLckdErr            -46        Volume is locked or read-only
  156.         paramErr            -50        Function not supported by volume
  157.         volOfflinErr        -53        Volume is offline
  158.         wrgVolTypErr        -123    Not an HFS volume
  159.         diffVolErr            -1303    Files on different volumes
  160.         afpAccessDenied        -5000    User does not have the correct access
  161.         afpObjectTypeErr    -5025    Object is a directory, not a file
  162.         afpSameObjectErr    -5038    Source and destination are the same
  163.  
  164.     __________
  165.     
  166.     Also see:    FSpExchangeFilesCompat
  167. */
  168.  
  169. /*****************************************************************************/
  170.  
  171. pascal    OSErr    ResolveFileIDRef(ConstStr255Param volName,
  172.                                  short vRefNum,
  173.                                  long fileID,
  174.                                  long *parID,
  175.                                  StringPtr fileName);
  176. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  177.     The ResolveFileIDRef function returns the filename and parent directory ID
  178.     of the file with the specified file ID reference.
  179.     
  180.     volName    input:    A pointer to the name of a mounted volume
  181.                     or nil.
  182.     vRefNum    input:    Volume specification.
  183.     fileID    input:    The file ID reference.
  184.     parID    output:    The parent directory ID of the file.
  185.     name    input:    Points to a buffer (minimum Str63) where the filename
  186.                     is to be returned or must be nil.
  187.             output:    The filename.
  188.     
  189.     Result Codes
  190.         noErr                0        No error
  191.         nsvErr                -35        Volume not found
  192.         ioErr                -36        I/O error
  193.         fnfErr                -43        File not found
  194.         paramErr            -50        Function not supported by volume
  195.         volOfflinErr        -53        Volume is offline
  196.         extFSErr            -58        External file system error - no file
  197.                                     system claimed this call.
  198.         wrgVolTypErr        -123    Not an HFS volume
  199.         fidNotFoundErr        -1300    File ID reference not found
  200.         notAFileErr            -1302    Specified file is a directory
  201.         afpAccessDenied        -5000    User does not have the correct access
  202.         afpObjectTypeErr    -5025    Specified file is a directory
  203.         afpIDNotFound        -5034    File ID reference not found
  204.         afpBadIDErr            -5039    File ID reference not found
  205.     
  206.     __________
  207.     
  208.     Also see:    FSpResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  209.                 DeleteFileIDRef
  210. */
  211.  
  212. /*****************************************************************************/
  213.  
  214. pascal    OSErr    FSpResolveFileIDRef(ConstStr255Param volName,
  215.                                     short vRefNum,
  216.                                     long fileID,
  217.                                     FSSpecPtr spec);
  218. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  219.     The FSpResolveFileIDRef function fills in an FSSpec with the location
  220.     of the file with the specified file ID reference.
  221.     
  222.     volName    input:    A pointer to the name of a mounted volume
  223.                     or nil.
  224.     vRefNum    input:    Volume specification.
  225.     fileID    input:    The file ID reference.
  226.     spec    input:    A pointer to a FSSpec record.
  227.             output:    A file system specification to be filled in by
  228.                     FSpResolveFileIDRef.
  229.     
  230.     Result Codes
  231.         noErr                0        No error
  232.         nsvErr                -35        Volume not found
  233.         ioErr                -36        I/O error
  234.         fnfErr                -43        File not found
  235.         paramErr            -50        Function not supported by volume or
  236.                                     no default volume
  237.         volOfflinErr        -53        Volume is offline
  238.         extFSErr            -58        External file system error - no file
  239.                                     system claimed this call.
  240.         wrgVolTypErr        -123    Not an HFS volume
  241.         fidNotFoundErr        -1300    File ID reference not found
  242.         notAFileErr            -1302    Specified file is a directory
  243.         afpAccessDenied        -5000    User does not have the correct access
  244.         afpObjectTypeErr    -5025    Specified file is a directory
  245.         afpIDNotFound        -5034    File ID reference not found
  246.         afpBadIDErr            -5039    File ID reference not found
  247.     
  248.     __________
  249.     
  250.     Also see:    ResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  251.                 DeleteFileIDRef
  252. */
  253.  
  254. /*****************************************************************************/
  255.  
  256. pascal    OSErr    CreateFileIDRef(short vRefNum,
  257.                                 long parID,
  258.                                 ConstStr255Param fileName,
  259.                                 long *fileID);
  260. /*    ¶ Establish a file ID reference for a file.
  261.     The CreateFileIDRef function creates a file ID reference for the
  262.     specified file, or if a file ID reference already exists, supplies
  263.     the file ID reference and returns the result code fidExists or afpIDExists.
  264.  
  265.     vRefNum        input:    Volume specification.
  266.     parID        input:    Directory ID.
  267.     fileName    input:    The name of the file.
  268.     fileID        output:    The file ID reference (if result is noErr,
  269.                         fidExists, or afpIDExists).
  270.     
  271.     Result Codes
  272.         noErr                0        No error
  273.         nsvErr                -35        Volume not found
  274.         ioErr                -36        I/O error
  275.         fnfErr                -43        File not found
  276.         wPrErr                -44        Hardware volume lock
  277.         vLckdErr            -46        Software volume lock
  278.         paramErr            -50        Function not supported by volume
  279.         volOfflinErr        -53        Volume is offline
  280.         extFSErr            -58        External file system error - no file
  281.                                     system claimed this call.
  282.         wrgVolTypErr        -123    Not an HFS volume
  283.         fidExists            -1301    File ID reference already exists
  284.         notAFileErrn        -1302    Specified file is a directory
  285.         afpAccessDenied        -5000    User does not have the correct access
  286.         afpObjectTypeErr    -5025    Specified file is a directory
  287.         afpIDExists            -5035    File ID reference already exists
  288.     
  289.     __________
  290.     
  291.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, FSpCreateFileIDRef,
  292.                 DeleteFileIDRef
  293. */
  294.  
  295. /*****************************************************************************/
  296.  
  297. pascal    OSErr    FSpCreateFileIDRef(const FSSpec *spec,
  298.                                    long *fileID);
  299. /*    ¶ Establish a file ID reference for a file.
  300.     The FSpCreateFileIDRef function creates a file ID reference for the
  301.     specified file, or if a file ID reference already exists, supplies
  302.     the file ID reference and returns the result code fidExists or afpIDExists.
  303.  
  304.     spec        input:    An FSSpec record specifying the file.
  305.     fileID        output:    The file ID reference (if result is noErr,
  306.                         fidExists, or afpIDExists).
  307.     
  308.     Result Codes
  309.         noErr                0        No error
  310.         nsvErr                -35        Volume not found
  311.         ioErr                -36        I/O error
  312.         fnfErr                -43        File not found
  313.         wPrErr                -44        Hardware volume lock
  314.         vLckdErr            -46        Software volume lock
  315.         paramErr            -50        Function not supported by volume
  316.         volOfflinErr        -53        Volume is offline
  317.         extFSErr            -58        External file system error - no file
  318.                                     system claimed this call.
  319.         wrgVolTypErr        -123    Not an HFS volume
  320.         fidExists            -1301    File ID reference already exists
  321.         notAFileErrn        -1302    Specified file is a directory
  322.         afpAccessDenied        -5000    User does not have the correct access
  323.         afpObjectTypeErr    -5025    Specified file is a directory
  324.         afpIDExists            -5035    File ID reference already exists
  325.     
  326.     __________
  327.     
  328.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  329.                 DeleteFileIDRef
  330. */
  331.  
  332. /*****************************************************************************/
  333.  
  334. pascal    OSErr    DeleteFileIDRef(ConstStr255Param volName,
  335.                                 short vRefNum,
  336.                                 long fileID);
  337. /*    ¶ Delete a file ID reference.
  338.     The DeleteFileIDRef function deletes a file ID reference.
  339.  
  340.     volName    input:    A pointer to the name of a mounted volume
  341.                     or nil.
  342.     vRefNum    input:    Volume specification.
  343.     fileID    input:    The file ID reference.
  344.     
  345.     Result Codes
  346.         noErr                0        No error
  347.         nsvErr                -35        Volume not found
  348.         ioErr                -36        I/O error
  349.         fnfErr                -43        File not found
  350.         wPrErr                -44        Hardware volume lock
  351.         vLckdErr            -46        Software volume lock
  352.         paramErr            -50        Function not supported by volume
  353.         volOfflinErr        -53        Volume is offline
  354.         extFSErr            -58        External file system error - no file
  355.                                     system claimed this call.
  356.         wrgVolTypErr        -123    Function is not supported by volume
  357.         fidNotFoundErr        -1300    File ID reference not found
  358.         afpAccessDenied        -5000    User does not have the correct access
  359.         afpObjectTypeErr    -5025    Specified file is a directory
  360.         afpIDNotFound        -5034    File ID reference not found
  361.     
  362.     __________
  363.     
  364.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  365.                 FSpCreateFileIDRef
  366. */
  367.  
  368. /*****************************************************************************/
  369.  
  370. pascal    OSErr    FlushFile(short refNum);
  371. /*    ¶ Write the contents of a file's access path buffer (the fork data).
  372.     The FlushFile function writes the contents of a file's access path
  373.     buffer (the fork data) to the volume. Note: some of the file's catalog
  374.     information stored on the volume may not be correct until FlushVol
  375.     is called.
  376.  
  377.     refNum    input:    The file reference number of an open file.
  378.     
  379.     Result Codes
  380.         noErr                0        No error
  381.         nsvErr                -35        Volume not found
  382.         ioErr                 -36        I/O error
  383.         fnOpnErr            -38        File not open
  384.         fnfErr                -43        File not found
  385.         rfNumErr            -51        Bad reference number
  386.         extFSErr            -58        External file system error - no file
  387.                                     system claimed this call.
  388. */
  389.  
  390. /*****************************************************************************/
  391.  
  392. pascal    OSErr    LockRange(short refNum,
  393.                           long rangeLength,
  394.                           long rangeStart);
  395. /*    ¶ Lock a portion of a file.
  396.     The LockRange function locks (denies access to) a portion of a file
  397.     that was opened with shared read/write permission.
  398.  
  399.     refNum        input:    The file reference number of an open file.
  400.     rangeLength    input:    The number of bytes in the range.
  401.     rangeStart    input:    The starting byte in the range to lock.
  402.     
  403.     Result Codes
  404.         noErr                0        No error
  405.         ioErr                -36        I/O error
  406.         fnOpnErr            -38        File not open
  407.         eofErr                -39        Logical end-of-file reached
  408.         fLckdErr            -45        File is locked by another user
  409.         paramErr            -50        Negative ioReqCount
  410.         rfNumErr            -51        Bad reference number
  411.         extFSErr            -58        External file system error - no file
  412.                                     system claimed this call.
  413.         volGoneErr            -124    Server volume has been disconnected
  414.         afpNoMoreLocks        -5015    No more ranges can be locked
  415.         afpRangeOverlap        -5021    Part of range is already locked
  416.  
  417.     __________
  418.     
  419.     Also see:    UnlockRange
  420. */
  421.  
  422. /*****************************************************************************/
  423.  
  424. pascal    OSErr    UnlockRange(short refNum,
  425.                             long rangeLength,
  426.                             long rangeStart);
  427. /*    ¶ Unlock a previously locked range.
  428.     The UnlockRange function unlocks (allows access to) a previously locked
  429.     portion of a file that was opened with shared read/write permission.
  430.  
  431.     refNum        input:    The file reference number of an open file.
  432.     rangeLength    input:    The number of bytes in the range.
  433.     rangeStart    input:    The starting byte in the range to unlock.
  434.     
  435.     Result Codes
  436.         noErr                0        No error
  437.         ioErr                -36        I/O error
  438.         fnOpnErr            -38        File not open
  439.         eofErr                -39        Logical end-of-file reached
  440.         paramErr            -50        Negative ioReqCount
  441.         rfNumErr            -51        Bad reference number
  442.         extFSErr            -58        External file system error - no file
  443.                                     system claimed this call.
  444.         volGoneErr            -124    Server volume has been disconnected
  445.         afpRangeNotLocked    -5020    Specified range was not locked
  446.  
  447.     __________
  448.     
  449.     Also see:    LockRange
  450. */
  451.  
  452. /*****************************************************************************/
  453.  
  454. pascal    OSErr    GetForeignPrivs(short vRefNum,
  455.                                 long dirID,
  456.                                 ConstStr255Param name,
  457.                                 void *foreignPrivBuffer,
  458.                                 long *foreignPrivSize,
  459.                                 long *foreignPrivInfo1,
  460.                                 long *foreignPrivInfo2,
  461.                                 long *foreignPrivInfo3,
  462.                                 long *foreignPrivInfo4);
  463. /*    ¶ Retrieve the native access-control information.
  464.     The GetForeignPrivs function retrieves the native access-control
  465.     information for a file or directory stored on a volume managed by
  466.     a foreign file system.
  467.     
  468.     vRefNum                input:    Volume specification.
  469.     dirID                input:    Directory ID.
  470.     name                input:    Pointer to object name, or nil when dirID
  471.                                 specifies a directory that's the object.
  472.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  473.                                 information is returned.
  474.                         output:    Privilege information.
  475.     foreignPrivSize        input:    Size of buffer pointed to by
  476.                                 foreignPrivBuffer.
  477.                         output: Amount of buffer actually used.
  478.     foreignPrivInfo1    output:    Information specific to privilege model.
  479.     foreignPrivInfo2    output:    Information specific to privilege model.
  480.     foreignPrivInfo3    output:    Information specific to privilege model.
  481.     foreignPrivInfo4    output:    Information specific to privilege model.
  482.     
  483.     Result Codes
  484.         noErr                0        No error
  485.         nsvErr                -35        Volume not found
  486.         paramErr            -50        Volume is HFS or MFS (that is, it has
  487.                                     no foreign privilege model), or foreign
  488.                                     volume does not support these calls
  489.     
  490.     __________
  491.     
  492.     Also see:    FSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  493. */
  494.  
  495. /*****************************************************************************/
  496.  
  497. pascal    OSErr    FSpGetForeignPrivs(const FSSpec *spec,
  498.                                    void *foreignPrivBuffer,
  499.                                    long *foreignPrivSize,
  500.                                    long *foreignPrivInfo1,
  501.                                    long *foreignPrivInfo2,
  502.                                    long *foreignPrivInfo3,
  503.                                    long *foreignPrivInfo4);
  504. /*    ¶ Retrieve the native access-control information.
  505.     The FSpGetForeignPrivs function retrieves the native access-control
  506.     information for a file or directory stored on a volume managed by
  507.     a foreign file system.
  508.     
  509.     spec                input:    An FSSpec record specifying the object.
  510.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  511.                                 information is returned.
  512.                         output:    Privilege information.
  513.     foreignPrivSize        input:    Size of buffer pointed to by
  514.                                 foreignPrivBuffer.
  515.                         output: Amount of buffer actually used.
  516.     foreignPrivInfo1    output:    Information specific to privilege model.
  517.     foreignPrivInfo2    output:    Information specific to privilege model.
  518.     foreignPrivInfo3    output:    Information specific to privilege model.
  519.     foreignPrivInfo4    output:    Information specific to privilege model.
  520.     
  521.     Result Codes
  522.         noErr                0        No error
  523.         nsvErr                -35        Volume not found
  524.         paramErr            -50        Volume is HFS or MFS (that is, it has
  525.                                     no foreign privilege model), or foreign
  526.                                     volume does not support these calls
  527.     
  528.     __________
  529.     
  530.     Also see:    GetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  531. */
  532.  
  533. /*****************************************************************************/
  534.  
  535. pascal    OSErr    SetForeignPrivs(short vRefNum,
  536.                                 long dirID,
  537.                                 ConstStr255Param name,
  538.                                 const void *foreignPrivBuffer,
  539.                                 long *foreignPrivSize,
  540.                                 long foreignPrivInfo1,
  541.                                 long foreignPrivInfo2,
  542.                                 long foreignPrivInfo3,
  543.                                 long foreignPrivInfo4);
  544. /*    ¶ Change the native access-control information.
  545.     The SetForeignPrivs function changes the native access-control
  546.     information for a file or directory stored on a volume managed by
  547.     a foreign file system.
  548.     
  549.     vRefNum                input:    Volume specification.
  550.     dirID                input:    Directory ID.
  551.     name                input:    Pointer to object name, or nil when dirID
  552.                                 specifies a directory that's the object.
  553.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  554.     foreignPrivSize        input:    Size of buffer pointed to by
  555.                                 foreignPrivBuffer.
  556.                         output: Amount of buffer actually used.
  557.     foreignPrivInfo1    input:    Information specific to privilege model.
  558.     foreignPrivInfo2    input:    Information specific to privilege model.
  559.     foreignPrivInfo3    input:    Information specific to privilege model.
  560.     foreignPrivInfo4    input:    Information specific to privilege model.
  561.     
  562.     Result Codes
  563.         noErr                0        No error
  564.         nsvErr                -35        Volume not found
  565.         paramErr            -50        Volume is HFS or MFS (that is, it has
  566.                                     no foreign privilege model), or foreign
  567.                                     volume does not support these calls
  568.     
  569.     __________
  570.     
  571.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs
  572. */
  573.  
  574. /*****************************************************************************/
  575.  
  576. pascal    OSErr    FSpSetForeignPrivs(const FSSpec *spec,
  577.                                    const void *foreignPrivBuffer,
  578.                                    long *foreignPrivSize,
  579.                                    long foreignPrivInfo1,
  580.                                    long foreignPrivInfo2,
  581.                                    long foreignPrivInfo3,
  582.                                    long foreignPrivInfo4);
  583. /*    ¶ Change the native access-control information.
  584.     The FSpSetForeignPrivs function changes the native access-control
  585.     information for a file or directory stored on a volume managed by
  586.     a foreign file system.
  587.     
  588.     spec                input:    An FSSpec record specifying the object.
  589.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  590.     foreignPrivSize        input:    Size of buffer pointed to by
  591.                                 foreignPrivBuffer.
  592.                         output: Amount of buffer actually used.
  593.     foreignPrivInfo1    input:    Information specific to privilege model.
  594.     foreignPrivInfo2    input:    Information specific to privilege model.
  595.     foreignPrivInfo3    input:    Information specific to privilege model.
  596.     foreignPrivInfo4    input:    Information specific to privilege model.
  597.     
  598.     Result Codes
  599.         noErr                0        No error
  600.         nsvErr                -35        Volume not found
  601.         paramErr            -50        Volume is HFS or MFS (that is, it has
  602.                                     no foreign privilege model), or foreign
  603.                                     volume does not support these calls
  604.     
  605.     __________
  606.     
  607.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs
  608. */
  609.  
  610. /*****************************************************************************/
  611.  
  612. pascal    OSErr    HGetLogInInfo(ConstStr255Param volName,
  613.                               short vRefNum,
  614.                               short *loginMethod,
  615.                               StringPtr userName);
  616. /*    ¶ Get the login method and user name used to log on to a shared volume.
  617.     The HGetLogInInfo function retrieves the login method and user name
  618.     used to log on to a particular shared volume.
  619.     
  620.     volName        input:    A pointer to the name of a mounted volume
  621.                         or nil.
  622.     vRefNum        input:    The volume reference number.
  623.     loginMethod    output:    The login method used (kNoUserAuthentication,
  624.                         kPassword, kEncryptPassword, or
  625.                         kTwoWayEncryptPassword).
  626.     userName    input:    Points to a buffer (minimum Str31) where the user
  627.                         name is to be returned or must be nil.
  628.                 output:    The user name.
  629.     
  630.     Result Codes
  631.         noErr                0        No error
  632.         nsvErr                -35        Specified volume doesn’t exist
  633.         paramErr            -50        Function not supported by volume
  634.     
  635.     __________
  636.     
  637.     Also see:    HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  638.                 FSpSetDirAccess, HMapName, HMapID
  639. */
  640.  
  641. /*****************************************************************************/
  642.  
  643. pascal    OSErr    HGetDirAccess(short vRefNum,
  644.                               long dirID,
  645.                               ConstStr255Param name,
  646.                               long *ownerID,
  647.                               long *groupID,
  648.                               long *accessRights);
  649. /*    ¶ Get a directory's access control information on a shared volume.
  650.     The HGetDirAccess function retrieves the directory access control
  651.     information for a directory on a shared volume.
  652.     
  653.     vRefNum            input:    Volume specification.
  654.     dirID            input:    Directory ID.
  655.     name            input:    Pointer to directory name, or nil if dirID
  656.                             specifies the directory.
  657.     ownerID            output:    The directory's owner ID.
  658.     groupID            output:    The directory's group ID or
  659.                             0 if no group affiliation.
  660.     accessRights    output:    The directory's access rights.
  661.     
  662.     Result Codes
  663.         noErr                0        No error
  664.         fnfErr                -43        Directory not found
  665.         paramErr            -50        Function not supported by volume
  666.         afpAccessDenied        -5000    User does not have the correct access
  667.                                     to the directory
  668.     
  669.     __________
  670.     
  671.     Also see:    HGetLogInInfo, FSpGetDirAccess, HSetDirAccess,
  672.                 FSpSetDirAccess, HMapName, HMapID
  673. */
  674.  
  675. /*****************************************************************************/
  676.  
  677. pascal    OSErr    FSpGetDirAccess(const FSSpec *spec,
  678.                                 long *ownerID,
  679.                                 long *groupID,
  680.                                 long *accessRights);
  681. /*    ¶ Get a directory's access control information on a shared volume.
  682.     The FSpGetDirAccess function retrieves the directory access control
  683.     information for a directory on a shared volume.
  684.     
  685.     spec            input:    An FSSpec record specifying the directory.
  686.     ownerID            output:    The directory's owner ID.
  687.     groupID            output:    The directory's group ID or
  688.                             0 if no group affiliation.
  689.     accessRights    output:    The directory's access rights.
  690.     
  691.     Result Codes
  692.         noErr                0        No error
  693.         fnfErr                -43        Directory not found
  694.         paramErr            -50        Function not supported by volume
  695.         afpAccessDenied        -5000    User does not have the correct access
  696.                                     to the directory
  697.     
  698.     __________
  699.     
  700.     Also see:    HGetLogInInfo, HGetDirAccess, HSetDirAccess,
  701.                 FSpSetDirAccess, HMapName, HMapID
  702. */
  703.  
  704. /*****************************************************************************/
  705.  
  706. pascal    OSErr    HSetDirAccess(short vRefNum,
  707.                               long dirID,
  708.                               ConstStr255Param name,
  709.                               long ownerID,
  710.                               long groupID,
  711.                               long accessRights);
  712. /*    ¶ Set a directory's access control information on a shared volume.
  713.     The HSetDirAccess function changes the directory access control
  714.     information for a directory on a shared volume. You must own a directory
  715.     to change its access control information.
  716.     
  717.     vRefNum            input:    Volume specification.
  718.     dirID            input:    Directory ID.
  719.     name            input:    Pointer to directory name, or nil if dirID
  720.                             specifies the directory.
  721.     ownerID            input:    The directory's owner ID.
  722.     groupID            input:    The directory's group ID or
  723.                             0 if no group affiliation.
  724.     accessRights    input:    The directory's access rights.
  725.     
  726.     Result Codes
  727.         noErr                0        No error
  728.         fnfErr                -43        Directory not found
  729.         vLckdErr            -46        Volume is locked or read-only
  730.         paramErr            -50        Parameter error
  731.         afpAccessDenied        -5000    User does not have the correct access
  732.                                     to the directory
  733.         afpObjectTypeErr    -5025    Object is a file, not a directory
  734.     
  735.     __________
  736.     
  737.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess,
  738.                 FSpSetDirAccess, HMapName, HMapID
  739. */
  740.  
  741. /*****************************************************************************/
  742.  
  743. pascal    OSErr    FSpSetDirAccess(const FSSpec *spec,
  744.                                 long ownerID,
  745.                                 long groupID,
  746.                                 long accessRights);
  747. /*    ¶ Set a directory's access control information on a shared volume.
  748.     The FSpSetDirAccess function changes the directory access control
  749.     information for a directory on a shared volume. You must own a directory
  750.     to change its access control information.
  751.     
  752.     spec            input:    An FSSpec record specifying the directory.
  753.     ownerID            input:    The directory's owner ID.
  754.     groupID            input:    The directory's group ID or
  755.                             0 if no group affiliation.
  756.     accessRights    input:    The directory's access rights.
  757.     
  758.     Result Codes
  759.         noErr                0        No error
  760.         fnfErr                -43        Directory not found
  761.         vLckdErr            -46        Volume is locked or read-only
  762.         paramErr            -50        Parameter error
  763.         afpAccessDenied        -5000    User does not have the correct access
  764.                                     to the directory
  765.         afpObjectTypeErr    -5025    Object is a file, not a directory
  766.     
  767.     __________
  768.     
  769.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  770.                 HMapName, HMapID
  771. */
  772.  
  773. /*****************************************************************************/
  774.  
  775. pascal    OSErr    HMapID(ConstStr255Param volName,
  776.                        short vRefNum,
  777.                        long ugID,
  778.                        short objType,
  779.                        StringPtr name);
  780. /*    ¶ Map a user or group ID to a user or group name.
  781.     The HMapID function determines the name of a user or group if you know
  782.     the user or group ID.
  783.     
  784.     volName        input:    A pointer to the name of a mounted volume
  785.                         or nil.
  786.     vRefNum        input:    Volume specification.
  787.     objType        input:    The mapping function code: 1 if you're mapping a
  788.                         user ID to a user name or 2 if you're mapping a
  789.                         group ID to a group name.
  790.     name        input:    Points to a buffer (minimum Str31) where the user
  791.                         or group name is to be returned or must be nil.
  792.                 output:    The user or group name.
  793.     
  794.     Result Codes
  795.         noErr                0        No error
  796.         fnfErr                -43        Unrecognizable owner or group name
  797.         paramErr            -50        Function not supported by volume
  798.     
  799.     __________
  800.     
  801.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  802.                 FSpSetDirAccess, HMapName
  803. */
  804.  
  805. /*****************************************************************************/
  806.  
  807. pascal    OSErr    HMapName(ConstStr255Param volName,
  808.                          short vRefNum,
  809.                          ConstStr255Param name,
  810.                          short objType,
  811.                          long *ugID);
  812. /*    ¶ Map a user or group name to a user or group ID.
  813.     The HMapName function determines the user or group ID if you know the
  814.     user or group name.
  815.     
  816.     volName        input:    A pointer to the name of a mounted volume
  817.                         or nil.
  818.     vRefNum        input:    Volume specification.
  819.     name        input:    The user or group name.
  820.     objType        input:    The mapping function code: 3 if you're mapping a
  821.                         user name to a user ID or 4 if you're mapping a
  822.                         group name to a group ID.
  823.     ugID        output:    The user or group ID.
  824.  
  825.     Result Codes
  826.         noErr                0        No error
  827.         fnfErr                -43        Unrecognizable owner or group name
  828.         paramErr            -50        Function not supported by volume
  829.     
  830.     __________
  831.     
  832.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  833.                 FSpSetDirAccess, HMapID
  834. */
  835.  
  836. /*****************************************************************************/
  837.  
  838. pascal    OSErr    HCopyFile(short srcVRefNum,
  839.                           long srcDirID,
  840.                           ConstStr255Param srcName,
  841.                           short dstVRefNum,
  842.                           long dstDirID,
  843.                           ConstStr255Param dstPathname,
  844.                           ConstStr255Param copyName);
  845. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  846.     The HCopyFile function duplicates a file and optionally to renames it.
  847.     The source and destination volumes must be on the same file server.
  848.     This function instructs the server to copy the file.
  849.     
  850.     srcVRefNum    input:    Source volume specification.
  851.     srcDirID    input:    Source directory ID.
  852.     srcName        input:    Source file name.
  853.     dstVRefNum    input:    Destination volume specification.
  854.     dstDirID    input:    Destination directory ID.
  855.     dstPathname    input:    Pointer to destination directory name, or
  856.                         nil when dstDirID specifies a directory.
  857.     copyName    input:    Points to the new file name if the file is to be
  858.                         renamed or nil if the file isn't to be renamed.
  859.     
  860.     Result Codes
  861.         noErr                0        No error
  862.         dskFulErr            -34        Destination volume is full
  863.         fnfErr                -43        Source file not found, or destination
  864.                                     directory does not exist
  865.         vLckdErr             -46        Destination volume is read-only
  866.         fBsyErr                 -47        The source or destination file could
  867.                                     not be opened with the correct access
  868.                                     modes
  869.         dupFNErr            -48        Destination file already exists
  870.         paramErr            -50        Function not supported by volume
  871.         wrgVolTypErr        -123    Function not supported by volume
  872.         afpAccessDenied        -5000    The user does not have the right to
  873.                                     read the source or write to the
  874.                                     destination
  875.         afpDenyConflict        -5006    The source or destination file could
  876.                                     not be opened with the correct access
  877.                                     modes
  878.         afpObjectTypeErr    -5025    Source is a directory
  879.     
  880.     __________
  881.     
  882.     Also see:    FSpCopyFile, FileCopy, FSpFileCopy
  883. */
  884.  
  885. /*****************************************************************************/
  886.  
  887. pascal    OSErr    FSpCopyFile(const FSSpec *srcSpec,
  888.                             const FSSpec *dstSpec,
  889.                             ConstStr255Param copyName);
  890. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  891.     The FSpCopyFile function duplicates a file and optionally to renames it.
  892.     The source and destination volumes must be on the same file server.
  893.     This function instructs the server to copy the file.
  894.     
  895.     srcSpec        input:    An FSSpec record specifying the source file.
  896.     dstSpec        input:    An FSSpec record specifying the destination
  897.                         directory.
  898.     copyName    input:    Points to the new file name if the file is to be
  899.                         renamed or nil if the file isn't to be renamed.
  900.     
  901.     Result Codes
  902.         noErr                0        No error
  903.         dskFulErr            -34        Destination volume is full
  904.         fnfErr                -43        Source file not found, or destination
  905.                                     directory does not exist
  906.         vLckdErr             -46        Destination volume is read-only
  907.         fBsyErr                 -47        The source or destination file could
  908.                                     not be opened with the correct access
  909.                                     modes
  910.         dupFNErr            -48        Destination file already exists
  911.         paramErr            -50        Function not supported by volume
  912.         wrgVolTypErr        -123    Function not supported by volume
  913.         afpAccessDenied        -5000    The user does not have the right to
  914.                                     read the source or write to the
  915.                                     destination
  916.         afpDenyConflict        -5006    The source or destination file could
  917.                                     not be opened with the correct access
  918.                                     modes
  919.         afpObjectTypeErr    -5025    Source is a directory
  920.     
  921.     __________
  922.     
  923.     Also see:    HCopyFile, FileCopy, FSpFileCopy
  924. */
  925.  
  926. /*****************************************************************************/
  927.  
  928. pascal    OSErr    HMoveRename(short vRefNum,
  929.                             long srcDirID,
  930.                             ConstStr255Param srcName,
  931.                             long dstDirID,
  932.                             ConstStr255Param dstpathName,
  933.                             ConstStr255Param copyName);
  934. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  935.     The HMoveRename function moves a file or directory and optionally
  936.     renames it. The source and destination locations must be on the same
  937.     shared volume.
  938.     
  939.     vRefNum        input:    Volume specification.
  940.     srcDirID    input:    Source directory ID.
  941.     srcName        input:    The source object name.
  942.     dstDirID    input:    Destination directory ID.
  943.     dstName        input:    Pointer to destination directory name, or
  944.                         nil when dstDirID specifies a directory.
  945.     copyName    input:    Points to the new name if the object is to be
  946.                         renamed or nil if the object isn't to be renamed.
  947.     
  948.     Result Codes
  949.         noErr                0        No error
  950.         fnfErr                -43        Source file or directory not found
  951.         fLckdErr            -45        File is locked
  952.         vLckdErr            -46        Destination volume is read-only
  953.         dupFNErr            -48        Destination already exists
  954.         paramErr            -50        Function not supported by volume
  955.         badMovErr            -122    Attempted to move directory into
  956.                                     offspring
  957.         afpAccessDenied        -5000    The user does not have the right to
  958.                                     move the file  or directory
  959.     
  960.     __________
  961.     
  962.     Also see:    FSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  963. */
  964.  
  965. /*****************************************************************************/
  966.  
  967. pascal    OSErr    FSpMoveRename(const FSSpec *srcSpec,
  968.                               const FSSpec *dstSpec,
  969.                               ConstStr255Param copyName);
  970. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  971.     The FSpMoveRename function moves a file or directory and optionally
  972.     renames it. The source and destination locations must be on the same
  973.     shared volume.
  974.     
  975.     srcSpec        input:    An FSSpec record specifying the source object.
  976.     dstSpec        input:    An FSSpec record specifying the destination
  977.                         directory.
  978.     copyName    input:    Points to the new name if the object is to be
  979.                         renamed or nil if the object isn't to be renamed.
  980.     
  981.     Result Codes
  982.         noErr                0        No error
  983.         fnfErr                -43        Source file or directory not found
  984.         fLckdErr            -45        File is locked
  985.         vLckdErr            -46        Destination volume is read-only
  986.         dupFNErr            -48        Destination already exists
  987.         paramErr            -50        Function not supported by volume
  988.         badMovErr            -122    Attempted to move directory into
  989.                                     offspring
  990.         afpAccessDenied        -5000    The user does not have the right to
  991.                                     move the file  or directory
  992.     
  993.     __________
  994.     
  995.     Also see:    HMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  996. */
  997.  
  998. /*****************************************************************************/
  999.  
  1000. pascal    OSErr    GetVolMountInfoSize(ConstStr255Param volName,
  1001.                                     short vRefNum,
  1002.                                     short *size);
  1003. /*    ¶ Get the size of a volume mounting information record.
  1004.     The GetVolMountInfoSize function determines the how much space the
  1005.     program needs to allocate for a volume mounting information record.
  1006.     
  1007.     volName        input:    A pointer to the name of a mounted volume
  1008.                         or nil.
  1009.     vRefNum        input:    Volume specification.
  1010.     size        output:    The space needed (in bytes) of the volume mounting
  1011.                         information record.
  1012.     
  1013.     Result Codes
  1014.         noErr                0        No error
  1015.         nsvErr                -35        Volume not found
  1016.         paramErr            -50        Parameter error
  1017.         extFSErr            -58        External file system error - no file
  1018.                                     system claimed this call.
  1019.  
  1020.     __________
  1021.     
  1022.     Also see:    GetVolMountInfo, VolumeMount BuildAFPVolMountInfo,
  1023.                 RetrieveAFPVolMountInfo
  1024. */
  1025.  
  1026. /*****************************************************************************/
  1027.  
  1028. pascal    OSErr    GetVolMountInfo(ConstStr255Param volName,
  1029.                                 short vRefNum,
  1030.                                 void *volMountInfo);
  1031. /*    ¶ Retrieve a volume mounting information record.
  1032.     The GetVolMountInfo function retrieves a volume mounting information
  1033.     record containing all the information needed to mount the volume,
  1034.     except for passwords.
  1035.     
  1036.     volName            input:    A pointer to the name of a mounted volume
  1037.                             or nil.
  1038.     vRefNum            input:    Volume specification.
  1039.     volMountInfo    output:    Points to a volume mounting information
  1040.                             record where the mounting information is to
  1041.                             be returned.
  1042.     
  1043.     Result Codes
  1044.         noErr                0        No error    
  1045.         nsvErr                -35        Volume not found    
  1046.         paramErr            -50        Parameter error    
  1047.         extFSErr            -58        External file system error - no file
  1048.                                     system claimed this call.
  1049.  
  1050.     __________
  1051.     
  1052.     Also see:    GetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,
  1053.                 RetrieveAFPVolMountInfo
  1054. */
  1055.  
  1056. /*****************************************************************************/
  1057.  
  1058. pascal    OSErr    VolumeMount(const void *volMountInfo,
  1059.                             short *vRefNum);
  1060. /*    ¶ Mount a volume using a volume mounting information record.
  1061.     The VolumeMount function mounts a volume using a volume mounting
  1062.     information record.
  1063.     
  1064.     volMountInfo    input:    Points to a volume mounting information record.
  1065.     vRefNum            output:    A volume reference number.
  1066.     
  1067.     Result Codes
  1068.         noErr                0        No error
  1069.         notOpenErr            -28        AppleTalk is not open
  1070.         nsvErr                -35        Volume not found
  1071.         paramErr            -50        Parameter error; typically, zone, server,
  1072.                                     and volume name combination is not valid
  1073.                                     or not complete, or the user name is not
  1074.                                     recognized
  1075.         extFSErr            -58        External file system error - no file
  1076.                                     system claimed this call.
  1077.         memFullErr            -108    Not enough memory to create a new volume
  1078.                                     control block for mounting the volume
  1079.         afpBadUAM            -5002    User authentication method is unknown
  1080.         afpBadVersNum        -5003    Workstation is using an AFP version that
  1081.                                     the server doesn’t recognize
  1082.         afpNoServer            -5016    Server is not responding
  1083.         afpUserNotAuth        -5023    User authentication failed (usually,
  1084.                                     password  is not correct)
  1085.         afpPwdExpired        -5042    Password has expired on server
  1086.         afpBadDirIDType        -5060    Not a fixed directory ID volume
  1087.         afpCantMountMoreSrvrs -5061    Maximum number of volumes has been
  1088.                                     mounted
  1089.         afpAlreadyMounted    -5062    Volume already mounted
  1090.         afpSameNodeErr        -5063    Attempt to log on to a server running
  1091.                                     on the same machine
  1092.  
  1093.     __________
  1094.     
  1095.     Also see:    GetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,
  1096.                 RetrieveAFPVolMountInfo
  1097. */
  1098.  
  1099. /*****************************************************************************/
  1100.  
  1101. pascal    OSErr    Share(short vRefNum,
  1102.                       long dirID,
  1103.                       ConstStr255Param name);
  1104. /*    ¶ Establish a local volume or directory as a share point.
  1105.     The Share function establishes a local volume or directory as a
  1106.     share point.
  1107.  
  1108.     vRefNum            input:    Volume specification.
  1109.     dirID            input:    Directory ID.
  1110.     name            input:    Pointer to directory name, or nil if dirID
  1111.                             specifies the directory.
  1112.     
  1113.     Result Codes
  1114.         noErr                0        No error    
  1115.         tmfoErr                -42        Too many share points    
  1116.         fnfErr                -43        File not found    
  1117.         dupFNErr            -48        Already a share point with this name    
  1118.         paramErr            -50        Function not supported by volume    
  1119.         dirNFErrdirNFErr    -120    Directory not found    
  1120.         afpAccessDenied        -5000    This directory cannot be shared    
  1121.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1122.         afpContainsSharedErr -5033    The directory contains a share point    
  1123.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1124.  
  1125.     __________
  1126.     
  1127.     Also see:    FSpShare, Unshare, FSpUnshare
  1128. */
  1129.  
  1130. /*****************************************************************************/
  1131.  
  1132. pascal    OSErr    FSpShare(const FSSpec *spec);
  1133. /*    ¶ Establish a local volume or directory as a share point.
  1134.     The FSpShare function establishes a local volume or directory as a
  1135.     share point.
  1136.  
  1137.     spec    input:    An FSSpec record specifying the share point.
  1138.     
  1139.     Result Codes
  1140.         noErr                0        No error    
  1141.         tmfoErr                -42        Too many share points    
  1142.         fnfErr                -43        File not found    
  1143.         dupFNErr            -48        Already a share point with this name    
  1144.         paramErr            -50        Function not supported by volume    
  1145.         dirNFErrdirNFErr    -120    Directory not found    
  1146.         afpAccessDenied        -5000    This directory cannot be shared    
  1147.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1148.         afpContainsSharedErr -5033    The directory contains a share point    
  1149.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1150.  
  1151.     __________
  1152.     
  1153.     Also see:    Share, Unshare, FSpUnshare
  1154. */
  1155.  
  1156. /*****************************************************************************/
  1157.  
  1158. pascal    OSErr    Unshare(short vRefNum,
  1159.                         long dirID,
  1160.                         ConstStr255Param name);
  1161. /*    ¶ Remove a share point.
  1162.     The Unshare function removes a share point.
  1163.  
  1164.     vRefNum            input:    Volume specification.
  1165.     dirID            input:    Directory ID.
  1166.     name            input:    Pointer to directory name, or nil if dirID
  1167.                             specifies the directory.
  1168.     
  1169.     Result Codes
  1170.         noErr                0        No error    
  1171.         fnfErr                -43        File not found    
  1172.         paramErr            -50        Function not supported by volume    
  1173.         dirNFErrdirNFErr    -120    Directory not found    
  1174.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1175.                                     this directory is not a share point    
  1176.  
  1177.     __________
  1178.     
  1179.     Also see:    Share, FSpShare, FSpUnshare
  1180. */
  1181.  
  1182. /*****************************************************************************/
  1183.  
  1184. pascal    OSErr    FSpUnshare(const FSSpec *spec);
  1185. /*    ¶ Remove a share point.
  1186.     The FSpUnshare function removes a share point.
  1187.  
  1188.     spec    input:    An FSSpec record specifying the share point.
  1189.     
  1190.     Result Codes
  1191.         noErr                0        No error    
  1192.         fnfErr                -43        File not found    
  1193.         paramErr            -50        Function not supported by volume    
  1194.         dirNFErrdirNFErr    -120    Directory not found    
  1195.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1196.                                     this directory is not a share point    
  1197.  
  1198.     __________
  1199.     
  1200.     Also see:    Share, FSpShare, Unshare
  1201. */
  1202.  
  1203. /*****************************************************************************/
  1204.  
  1205. pascal    OSErr    GetUGEntry(short objType,
  1206.                            StringPtr objName,
  1207.                            long *objID);
  1208. /*    ¶ Retrieve a user or group entry from the local file server.
  1209.     The GetUGEntry function retrieves user or group entries from the
  1210.     local file server.
  1211.  
  1212.     objType        input:    The object type: -1 = group; 0 = user
  1213.     objName        input:    Points to a buffer (minimum Str31) where the user
  1214.                         or group name is to be returned or must be nil.
  1215.                 output:    The user or group name.
  1216.     objID        input:    O to get the first user or group. If the entry objID
  1217.                         last returned by GetUGEntry is passed, then user or
  1218.                         group whose alphabetically next in the list of entries
  1219.                         is returned.
  1220.                 output:    The user or group ID.
  1221.     
  1222.     Result Codes
  1223.         noErr                0        No error    
  1224.         fnfErr                -43        No more users or groups    
  1225.         paramErr            -50        Function not supported; or, ioObjID is
  1226.                                     negative    
  1227.  
  1228.     __________
  1229.     
  1230.     Also see:    GetUGEntries
  1231. */
  1232.  
  1233. /*****************************************************************************/
  1234.  
  1235. #ifdef __cplusplus
  1236. }
  1237. #endif
  1238.  
  1239. #include "OptimizationEnd.h"
  1240.  
  1241. #endif    /* __MOREFILES__ */
  1242.